package com.huangkailong.designpattern.adapter.clazz;

import com.huangkailong.designpattern.adapter.Ac220v;
import com.huangkailong.designpattern.adapter.Dc5v;

/**
 * 类模式的电源适配器，把 AC220V 转 DC5V.
 *
 * @author huangkl
 * @since 1.0.0
 */
public class PowerAdapter extends Ac220v implements Dc5v {
    @Override
    public int outputDc5v() {
        int ac220v = super.oupAc220v();
        System.out.println("AC220V 转 DC5V");
        return ac220v / 44;
    }
}
